package com.wangxq.loginmodule.yd_login.login.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.wangxq.loginmodule.yd_login.login.mvp.contract.LoginType2Contract;
import com.wangxq.loginmodule.yd_login.login.mvp.model.LoginType2Model;


@Module
public class LoginType2Module {
    private LoginType2Contract.View view;

    /**
     * 构建LoginType2Module时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     * @param view
     */
    public LoginType2Module(LoginType2Contract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    LoginType2Contract.View provideLoginType2View(){
        return this.view;
    }

    @ActivityScope
    @Provides
    LoginType2Contract.Model provideLoginType2Model(LoginType2Model model){
        return model;
    }
}